﻿using OpenCvSharp;

using System;
using System.Threading.Tasks;

using Xc.DataAccess.CodeReader.Models;
using Xc.DataAccess.CodeReader.Models.Filters;
using Xc.DataAccess.Core;

namespace Xc.DataAccess.CodeReader
{
    /// <summary>
    /// 图像过滤器
    /// </summary>
    public interface IMatFilterService
    {
        /// <summary>
        /// 使用指定过滤器直接过滤
        /// </summary>
        /// <param name="mat"></param>
        /// <param name="imageFilter"></param>
        /// <returns></returns>
        Task<ResultData<Mat>> UseDirect(Mat mat,params FilterBase[] imageFilter);

        /// <summary>
        /// 添加过滤器
        /// </summary>
        /// <param name="imageFilter"></param>
        /// <returns></returns>
        IMatFilterService Add(params FilterBase[] imageFilter);

        /// <summary>
        /// 使用过滤器开始过滤
        /// </summary>
        /// <param name="mat"></param>
        /// <returns></returns>
        Task<ResultData<Mat>> Use(Mat mat, FilterBase[] imageFilter=null);
    }
}
